import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home/Home.vue";
import Login from "../views/Login/Login.vue";
import Faxian from "../views/Faxian/Faxian.vue";


Vue.use(VueRouter);

const routes = [{
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/home1",
    name: "Home1",
    component: () =>
      import("../views/Home/Home1.vue"),
  },
  {
    path: "/home2",
    name: "Home2",
    component: () =>
      import("../views/Home/Home2.vue"),
  },
  {
    path: "/huodon",
    name: "Huodong",
    component: () =>
      import("../views/Shangxiang/Huodon.vue"),
  },
  {
    path:"/baomin",
    name:"Baomin",
    component: () =>
         import("../views/Shangxiang/Baomin.vue"),
  },
  {
    path:"/youji",
    name:"Youji",
    component: () =>
         import("../views/Shangxiang/Youji.vue"),
  },
  {
    path:"/mudidi",
    name:"Mudidi",
    component: () =>
         import("../views/Shangxiang/Mudidi.vue"),
  },
  {
    path:"/mypage",
    name:"Mypage",
    component: () =>
      import("../views/MyPage/Mypage.vue"),
  },
  {
    path: "/mypinglun",
    name: "Mypinglun",
    component: () =>
      import("../views/MyPage/Mypinglun.vue"),
  },
  {
    path: "/myxiaoxi",
    name: "Myxiaoxi",
    component: () =>
      import("../views/MyPage/Myxiaoxi.vue"),
  },
  {
    path: "/collection",
    name: "Collection",
    component: () =>
      import("../views/CollectionPage/Collection.vue"),
  },
  {
    path: "/geren",
    name: "Geren",
    component: () =>
      import("../views/geren/Geren.vue"),
  },
  {
    path: "/fabu",
    name: "Fabu",
    component: () =>
      import("../views/Fabu/Fabu.vue"),
  },
  {
    path:"/fabu2",
    name:"Fabu2",
    component: () =>
         import("../views/Fabu/Fabu2.vue"),
  },
  {
    path:"/sousuo",
    name:"Sousuo",
    component: () =>
      import("../views/Sousuo/Sousuo.vue"),
  },
  {
    path: "/register",
    name: "Register",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import( /* webpackChunkName: "about" */ "../views/Login/Register.vue"),
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  {
    path: "/faxian",
    name: "Faxian",
    component: Faxian,
  },
  {
    path: "/discuss",
    name: "Discuss",
    component: () =>
      import("../views/Discuss/Discuss.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;